package net.adetech.crj.service;

import net.adetech.crj.dao.HallMapper;
import net.adetech.crj.entity.Hall;
import net.adetech.crj.utils.InnerServiceUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service("hall.getById")
public class GetHallByIdService implements BaseService{
    @Autowired
    HallMapper hallMapper;
    @Override
    public Map<String, Object> invoke(Map<String, Object> params) {
        Integer hallId = (Integer)params.get("hallId");
        Hall hall = hallMapper.getHallById(hallId);
        return InnerServiceUtil.buildResult("hall",hall);
    }

}
